/**
 * 功能描述
 */
define(function (require, exports, module) {
    //引入视图基类
    var ELView = require("elview");

    //assets
    var template = require("./assets/tpl/employeesrecharge_main.tpl");
    require("./assets/css/employeesrecharge_main.css");

    //business

    //component

    var EmployeesRechargeSubnavComp = require("./component/EmployeesRechargeSubnavComp.js");
    var EmployeesRechargeGridComp = require("./component/EmployeesRechargeGridComp.js");
    var EmployeesRechargeEGridComp = require("./component/EmployeesRechargeEGridComp.js");
    //constant

    //handler

    //store

    var App = ELView.extend({
        attrs: {
            template: template
        },
        initComponent: function (params, widget) {
        	EmployeesRechargeSubnavComp.initComponent(params, widget);
        	EmployeesRechargeGridComp.initComponent(params, widget);
        	EmployeesRechargeEGridComp.initComponent(params, widget);

        },
        afterInitComponent: function (params, widget) {

        	var subnav=widget.get("subnav");
        	var grid=widget.get("grid");
        	subnav.load("servicePoint", {
                callback: function(data) {
                    subnav.setData("servicePoint", data);
                    grid.refresh();
                }
            });
        
            
        }
    });

    module.exports = App;
});
